package de.justphil.tcg.tcgserver.game.mechanics.property;

import de.justphil.tcg.tcgserver.game.mechanics.game.Game;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.AttackDamageReflection;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Attacker;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Damage;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.DeathExplosion;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Fury;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.FuryAura;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Lazy;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.MultiAttack;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Paralyzed;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.ParalyzingAttack;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.PoisonDefensLoss;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.PoisonResistant;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Poisonous;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Regeneration;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.RegenerationAura;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Resistance;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.ResistanceAura;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Retaliation;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.SleepAttack;
import de.justphil.tcg.tcgserver.game.mechanics.property.properties.Sleeping;

public class PropertyFactory {

	
	public static Property getProperty(int property) {
		
		return getProperty(null, property);
	}
	
	public static Property getProperty(Game game, int property) {

		switch (property) {

		case Property.PROPERTY_FURY_AURA:

			return new FuryAura(game);

		case Property.PROPERTY_FURY:

			return new Fury(game);

		case Property.PROPERTY_PARALYZED:

			return new Paralyzed(game);

		case Property.PROPERTY_PARALYZING_ATTACK:

			return new ParalyzingAttack(game);

		case Property.PROPERTY_DAMAGE:

			return new Damage(game);

		case Property.PROPERTY_POISON_DEFENSE_LOSS:

			return new PoisonDefensLoss(game);

		case Property.PROPERTY_POISON_RESISTANT:

			return new PoisonResistant(game);

		case Property.PROPERTY_POISONOUS:

			return new Poisonous(game);

		case Property.PROPERTY_DEATH_EXPLOSION:

			return new DeathExplosion(game);

		case Property.PROPERTY_RESISTANCE:

			return new Resistance(game);

		case Property.PROPERTY_RESISTANCE_AURA:

			return new ResistanceAura(game);

		case Property.PROPERTY_REGENERATION:

			return new Regeneration(game);

		case Property.PROPERTY_SLEEPING:

			return new Sleeping(game);

		case Property.PROPERTY_LAZY:

			return new Lazy(game);

		case Property.PROPERTY_SLEEP_ATTACK:

			return new SleepAttack(game);

		case Property.PROPERTY_MULTI_ATTACK:

			return new MultiAttack(game);

		case Property.PROPERTY_REGENERATION_AURA:

			return new RegenerationAura(game);

		case Property.PROPERTY_RETALIATION:

			return new Retaliation(game);

		case Property.PROPERTY_ATTACK_DAMAGE_REFLECTION:

			return new AttackDamageReflection(game);

		case Property.PROPERTY_ATTACKER:

			return new Attacker(game);

		default:

			assert false : "Could not create property of type " + property
					+ "!";

			return null;
		}
	}
}
